import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '*',
    redirect: 'login'
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('_v/user/login')
  }
  ,
  {
    path: '/index',
    name: 'index',
    component: () => import('_v/goods/list')
  } ,
  {
    path: '/home',
    name: 'home',
    component: () => import('_v/goods/list')
  },
  {
    path: '/cart',
    name: 'cart',
    component: () => import('_v/cart/index')
  },
  {
    path: '/activity',
    name: 'activity',
    component: () => import('_v/activity/activity')
  },
  {
    path: '/me',
    name: 'me',
    component: () => import('_v/user/me')
  },
  {
    path: '/memberRecharge',
    name: 'memberRecharge',
    component: () => import('_v/user/memberRecharge')
  },
  {
    path: '/memberGrowth',
    name: 'memberGrowth',
    component: () => import('_v/user/memberGrowth')
  },
  {
    path: '/suborders',
    name: 'suborders',
    component: () => import('_v/user/suborders')
  }
  ,
  {
    path: '/goodInfo/:id',
    name: 'goodInfo',
    component: () => import('_v/goods/goodInfo')
  },{
    path: '/coupons',
    name: 'coupons',
    component: () => import('_v/user/coupons')
  }
  
]

const router = new VueRouter({
  routes
})

export default router
